using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._Raster._Reclass
{
    /// <summary>
    /// <para>Reclassify</para>
    /// <para>Reclassifies (or changes) the values in a raster.</para>
    /// <para>对栅格中的值进行重分类（或更改）。</para>
    /// </summary>    
    [DisplayName("Reclassify")]
    public class Reclassify : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Reclassify()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para>The input raster to be reclassified.</para>
        /// <para>要重新分类的输入栅格。</para>
        /// </param>
        /// <param name="_reclass_field">
        /// <para>Reclass field</para>
        /// <para>Field denoting the values that will be reclassified.</para>
        /// <para>表示将重新分类的值的字段。</para>
        /// </param>
        /// <param name="_remap">
        /// <para>Reclassification</para>
        /// <para><xdoc>
        ///   <para>A remap table that defines how the values will be reclassified. Working with the table and it options are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>The values of the input raster can be classified as ranges of values or as individual values. The table will be displayed with Start and End values or single unique values, respectively. If the input is a layer in Contents, it will import the unique values or classified breaks of the symbology.</bullet_item><para/>
        ///     <bullet_item>Specify the New value that will be assigned in the output raster. Only integer values are supported.</bullet_item><para/>
        ///     <bullet_item>Use the Classify or Unique options to generate a remap table based on the values of the input raster. The Classify option opens a dialog and allow you to specify a method from one of the Data classification methods and number of classes. The Unique option will populate the remap table using the unique values from the input dataset.</bullet_item><para/>
        ///     <bullet_item>The Reverse New Values option resorts the new values list (for example, 1,2,3 becomes 3,2,1).</bullet_item><para/>
        ///     <bullet_item>To modify the table, new entries can be added by typing in the empty cells in the table and pressing the Enter key. This will validate the new entry and create a new, empty row for subsequent input. You can delete rows by selecting one or many rows and pressing the Delete key.</bullet_item><para/>
        ///     <bullet_item>Use the load and save options to save a remap for later use and apply it to other input data or for quickly repeating an analysis.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个重新映射表，用于定义如何对值进行重新分类。使用表及其选项如下：</para>
        ///   <bulletList>
        ///     <bullet_item>输入栅格的值可分类为值范围或单个值。该表将分别显示“开始”和“结束”值或单个唯一值。如果输入是内容中的图层，则它将导入符号系统的唯一值或分类间隔。</bullet_item><para/>
        ///     <bullet_item>指定将在输出栅格中分配的新值。仅支持整数值。</bullet_item><para/>
        ///     <bullet_item>使用分类或唯一选项可根据输入栅格的值生成重映射表。“分类”选项将打开一个对话框，并允许您从“数据分类”方法之一中指定方法和类数。“唯一”选项将使用输入数据集中的唯一值填充重映射表。</bullet_item><para/>
        ///     <bullet_item>“反转新值”选项可选择新值列表（例如，1,2,3 变为 3,2,1）。</bullet_item><para/>
        ///     <bullet_item>要修改表格，可以通过在表格中键入空单元格并按 Enter 键来添加新条目。这将验证新条目并为后续输入创建一个新的空行。您可以通过选择一行或多行并按 Delete 键来删除行。</bullet_item><para/>
        ///     <bullet_item>使用加载和保存选项保存重映射以供以后使用，并将其应用于其他输入数据或快速重复分析。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output reclassified raster.</para>
        ///   <para>The output will always be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出对栅格进行了重新分类。</para>
        ///   <para>输出将始终为整数类型。</para>
        /// </xdoc></para>
        /// </param>
        public Reclassify(object _in_raster, object _reclass_field, object _remap, object _out_raster)
        {
            this._in_raster = _in_raster;
            this._reclass_field = _reclass_field;
            this._remap = _remap;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Reclassify";

        public override string CallName => "3d.Reclassify";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "parallelProcessingFactor", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _reclass_field, _remap, _out_raster, _missing_values.GetGPValue()];

        /// <summary>
        /// <para>Input raster</para>
        /// <para>The input raster to be reclassified.</para>
        /// <para>要重新分类的输入栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Reclass field</para>
        /// <para>Field denoting the values that will be reclassified.</para>
        /// <para>表示将重新分类的值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reclass field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _reclass_field { get; set; }


        /// <summary>
        /// <para>Reclassification</para>
        /// <para><xdoc>
        ///   <para>A remap table that defines how the values will be reclassified. Working with the table and it options are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>The values of the input raster can be classified as ranges of values or as individual values. The table will be displayed with Start and End values or single unique values, respectively. If the input is a layer in Contents, it will import the unique values or classified breaks of the symbology.</bullet_item><para/>
        ///     <bullet_item>Specify the New value that will be assigned in the output raster. Only integer values are supported.</bullet_item><para/>
        ///     <bullet_item>Use the Classify or Unique options to generate a remap table based on the values of the input raster. The Classify option opens a dialog and allow you to specify a method from one of the Data classification methods and number of classes. The Unique option will populate the remap table using the unique values from the input dataset.</bullet_item><para/>
        ///     <bullet_item>The Reverse New Values option resorts the new values list (for example, 1,2,3 becomes 3,2,1).</bullet_item><para/>
        ///     <bullet_item>To modify the table, new entries can be added by typing in the empty cells in the table and pressing the Enter key. This will validate the new entry and create a new, empty row for subsequent input. You can delete rows by selecting one or many rows and pressing the Delete key.</bullet_item><para/>
        ///     <bullet_item>Use the load and save options to save a remap for later use and apply it to other input data or for quickly repeating an analysis.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个重新映射表，用于定义如何对值进行重新分类。使用表及其选项如下：</para>
        ///   <bulletList>
        ///     <bullet_item>输入栅格的值可分类为值范围或单个值。该表将分别显示“开始”和“结束”值或单个唯一值。如果输入是内容中的图层，则它将导入符号系统的唯一值或分类间隔。</bullet_item><para/>
        ///     <bullet_item>指定将在输出栅格中分配的新值。仅支持整数值。</bullet_item><para/>
        ///     <bullet_item>使用分类或唯一选项可根据输入栅格的值生成重映射表。“分类”选项将打开一个对话框，并允许您从“数据分类”方法之一中指定方法和类数。“唯一”选项将使用输入数据集中的唯一值填充重映射表。</bullet_item><para/>
        ///     <bullet_item>“反转新值”选项可选择新值列表（例如，1,2,3 变为 3,2,1）。</bullet_item><para/>
        ///     <bullet_item>要修改表格，可以通过在表格中键入空单元格并按 Enter 键来添加新条目。这将验证新条目并为后续输入创建一个新的空行。您可以通过选择一行或多行并按 Delete 键来删除行。</bullet_item><para/>
        ///     <bullet_item>使用加载和保存选项保存重映射以供以后使用，并将其应用于其他输入数据或快速重复分析。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reclassification")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _remap { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output reclassified raster.</para>
        ///   <para>The output will always be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出对栅格进行了重新分类。</para>
        ///   <para>输出将始终为整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Change missing values to NoData</para>
        /// <para><xdoc>
        ///   <para>Denotes whether missing values in the reclass table retain their value or get mapped to NoData.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Signifies that if any cell location on the input raster contains a value that is not present or reclassed in a remap table, the value should remain intact and be written for that location to the output raster. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Signifies that if any cell location on the input raster contains a value that is not present or reclassed in a remap table, the value will be reclassed to NoData for that location on the output raster.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>表示重分类表中的缺失值是保留其值还是映射到 NoData。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 表示如果输入栅格上的任何像元位置包含的值在重映射表中不存在或未重分类，则该值应保持不变，并将该位置的值写入输出栅格。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 表示如果输入栅格上的任何像元位置包含重映射表中不存在或未重分类的值，则该值将重分类为输出栅格上该位置的 NoData。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Change missing values to NoData")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _missing_values_value _missing_values { get; set; } = _missing_values_value._false;

        public enum _missing_values_value
        {
            /// <summary>
            /// <para>DATA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DATA")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>NODATA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NODATA")]
            [GPEnumValue("true")]
            _true,

        }

        public Reclassify SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}